Skip to content

MoeTaher/Broker_Writeup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Broker_Writeup

6bf0be37c0ab865c34fd3a3a547d0cb3

Start with nmap ...

Screenshot from 2021-03-15 14-39-17

we found that we have 2 Open ports , 1883 for the mqtt service and 8161 http for Activemq

Manually check the http, we got auth required for admin dir

Screenshot from 2021-03-15 15-09-31

Search for Default Creds for Activemq

Screenshot from 2021-03-15 14-40-26

you can find an interesting topic called "secret_chat"

Screenshot from 2021-03-15 14-41-14

Use Mqtt client to Subscribe to the "secret_chat" and see the queued messages

Screenshot from 2021-03-15 14-44-03

Foothold

Searching for Activemq CVE i found this github page for cve-2016-3088 https://github.com/coffeehb/Some-PoC-oR-ExP/tree/master/ActiveMQExP

Screenshot from 2021-03-15 14-55-28

Screenshot from 2021-03-15 14-56-01

Privilege Escalation

checking the "sudo -l" first we Got this..

Screenshot from 2021-03-15 14-58-31

We can run subscribe.py as a root, we check if we have a write permissions to the file.

Screenshot from 2021-03-15 14-59-08

Yes we have!, now we can exploit it easly by adding shell in the file.

Screenshot from 2021-03-15 15-00-44

run the file.

Screenshot from 2021-03-15 15-01-17

Have fun! :D

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published